Repository navigation
docs(agents): AGENTS.md routes each task to the document that owns it, and no agent prompt or instruction carries the legacy process - #1975
Merged
Conversation
…, and no agent prompt or instruction carries the legacy process AGENTS.md is a router of 6,221 characters: the purpose, 13 rules that every task needs, what only a person does, and a table that sends each kind of task to the document that owns it. Each other rule is in its owner (CONTRIBUTING.md, ARCHITECTURE.md, SECURITY.md, docs/TESTING.md, k8s/README.md, docs/SDLC.md) or is deleted. CONST_AGENTS_MD_MAX_CHARS is 6,500. devops ai agents renders the router and the pointer stubs from Jinja2 templates. The router names no path of devops-cli, routes only to documents that exist in the target, and names the pre-push hooks of the target. The inline prompt moved to ai/tasks/generate_agents.md, and a model answer over the cap falls back to the template. The prompts, personas, knowledge base, openspec/config.yaml and the routed documents lose the legacy process. A test fails when an agent instruction names a deleted process. Closes #1961
dan-petty
marked this pull request as ready for review
October 23, 2026 19:48
This was referenced Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every agent reads AGENTS.md in full at the start of each session. The file held 36,534 characters of rules, and many of them repeated, contradicted or outlived the documents that own the subject. The owner asked on 2026-10-23 for agent files that route to other documents instead of thousands of lines of instructions.
CONST_AGENTS_MD_MAX_CHARSis 6,500.CONTRIBUTING.md,ARCHITECTURE.mdsection 7,SECURITY.md(new principles 8, 9 and 10),docs/TESTING.md,k8s/README.mdanddocs/SDLC.mdPhase 6 received the rules that they did not state yet.Newitself. The "Continuous Interaction" rule is deleted. release-please writesCHANGELOG.md,.release-please-manifest.jsonand the version lines, so nobody edits those by hand, and agents change the release workflow and its configuration through ordinary pull requests. The rule "Agents take no part in releases", the release pull request exclusion of the FIFO rule and theRelease-Asrule are deleted.RELEASE_CYCLE.md,docs/SDLC.md,docs/ROUTINE_TASKS.mdand the knowledge base say the same.devops ai agentsrenders the router for another repository fromsrc/devops_cli/templates/AGENTS.md.j2throughdevops_cli.core.templating, and the stubs frompointer_stub.md.j2. The router names no path, setting or dependency of devops-cli and no writing standard. Its table has a row for each document ofCONST_AGENTS_MD_ROUTESthat exists in the target, and its push rule names the pre-push hooks of the target.is_devops_cli, the alpha notice of the stubs, the f-string template and its# nosec B608are deleted, so thesrc nosecceiling falls from 14 to 13. The inline prompt ofsrc/devops_cli/commands/ai.pymoved tosrc/devops_cli/ai/tasks/generate_agents.md. The model gets the cap and the documents that exist, and an answer longer than the cap is replaced by the template.openspec/config.yaml,docs/agent/README.md,.devops/review.md,docs/SDLC.mdanddocs/ROUTINE_TASKS.mdlose the legacy process: task status in task files, card moves before an edit, implementation plans outside OpenSpec, wrong MCP tool names, stale gate lists, arelease/*branch in a benchmark prompt, a baregh release downloadexample and a token piped intogh auth login.Evidence:
tests/test_agents_md_claims.pyholds AGENTS.md and the generated router within the cap, checks that each row of the table links a document that exists, checks that a generated router routes only to documents that exist, and fails when an agent instruction names a deleted process (CONST_DELETED_PROCESS_TERMS). A negative control checks the scan.tests/test_instruction_generator.pychecks the router shape, the pre-push commands, the stubs and the model fallback.uv run devops docs generate --sync-readme,uv run devops docs checkanduv run devops openspec checkpass.Item
Closes #1961
Task file:
docs/agent/tasks/task-1961-agents-router.md